package study.lxy.spring.springboot2.entity;

public class MyResponseEntity {

    private String code;
    private String message;
    private Object data;

    public MyResponseEntity(String code, String message){
        this.code = code;
        this.message = message;
    }

    public MyResponseEntity(String code, String message, Object data){
        this(code,message);
        this.data = data;
    }

    public static MyResponseEntity success(Object data){
        return new MyResponseEntity("0000","交易成功",data);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
